import React, { FC } from 'react'

export type Props = {
  ICPRecordCodeQueryUrl?: string
  publicSecurityRecordQueryUrl?: string
  publicSecurityRecordCode?: string
  ICPRecordCode?: string
}

const WebsiteRecord: FC<Props> = ({
  ICPRecordCodeQueryUrl = 'https://beian.miit.gov.cn',
  ICPRecordCode = '2021003860号-1',
  publicSecurityRecordQueryUrl = 'http://www.beian.gov.cn/portal/registerSystemInfo',
  publicSecurityRecordCode = '34170202000420',
}) => {
  return (
    <div className="flex flex-wrap justify-center py-4 text-sm text-gray-500">
      <a
        target="_blank"
        rel="noreferrer"
        href={`${ICPRecordCodeQueryUrl}`}
        className="flex flex-nowrap items-center px-4"
      >
        <p className="px-4">皖ICP备{ICPRecordCode}</p>
      </a>

      <a
        target="_blank"
        rel="noreferrer"
        href={`${publicSecurityRecordQueryUrl}?recordcode=${publicSecurityRecordCode}`}
        className="flex flex-nowrap items-center px-4"
      >
        <img src="/images/publicSecurityRecord.png" />
        <p className="pl-1">皖公网安备 {publicSecurityRecordCode}号</p>
      </a>
    </div>
  )
}

export default WebsiteRecord
